<?
	
	//require_once('../fun/accounts.php');
	require_once('../fun/treatments.php');
	$results = GetTreatments();

?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Treatments | &psi; Psychology Database &psi;</title>
<? include ("../inc/required-links.php") ?>
</head>

<body>
<div id="wrapper">
	<div id="l_l"></div> 
    <div id="left">
		<?php include ('../nav/home/treatments.php') ?>
    </div>
    <div id="main">
		<?php include ('../inc/header.php') ?>
        <div id="t_bg"></div>
        <div id="content">
			<div class="otstup">
            	<div id="main_left">
            		<h1 style="text-align:center;">Treatments</h1>
					<div class="corners">
                    	<div class="text">
                        
                			<table class="table-hover" style="color:black; width:100%; text-align:center;" cellpadding="0" cellspacing="0">
                    			<tr>
                        			<th>Diagnosis</th><th>Action</th>
                    			</tr>
                   	 		<? while($rs = $results->fetch_assoc()): ?>
                        		<tr>
                            		<td style="text-align:left;"><?=$rs['Diagnosis']?></td>
                            		<td>
                                        <a class="detail-link" href="../treatments/details.php?id=<?=$rs['id']?>&returnUrl=<?=$_SERVER['PHP_SELF']?>">Details</a>
                                    </td>
                        		</tr>
                    		<? endwhile; ?>
                			</table>
                        </div>
                    </div>
                </div>
                <div id="right">
					<?php include ('../inc/cat_box1.php') ?>
					<?php include ('../inc/cat_box2.php') ?>
					<?php include ('../inc/cat_box3.php') ?>
					<?php include ('../inc/cat_box4.php') ?>
					<?php include ('../inc/sn_links.php') ?>
                </div>
        		<div class="clear"></div>
        	</div>
        </div>
        <div class="clear"></div>  
        <div id="foot">
        	<?php include ('../inc/footer.php') ?>
		</div>
		<?php include ('../inc/copywright.php') ?>
        </div>
<div class="clear"></div> 
</div>
</body>
</html>
<? include ("../inc/required-js.php") ?>
<script type="text/javascript"><!--
/*$(function(){
	$('table').dataTable( {
		"bProcessing": true,
		"sAjaxSource": "../api/treatments.php",
		"aoColumns": [
			{ "mData": "Diagnosis" },
			{ "mData": html("<a class=\"detail-link\" href=\"../treatments/details.php?id=<?=$rs['id']?>\"><?=$rs['Diagnosis']?></a>") }
		]
	} );
});*/
--></script>